<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>商家月报表</title>
</head>
<body>
<div ng-app="myApp" ng-controller="MonthCtrl">
        <ui-form key="mothAdd" column="2">
            <ui-form-input name="nickname" label="规则别名:"></ui-form-input>
            <ui-form-input name="code" label="规则简码:"></ui-form-input>
            <ui-form-input name="supplierCode" label="供货商编码:"></ui-form-input>
            <ui-form-region label="省份" p-name="fromProvince" c-name="fromCode"></ui-form-region>
            <ui-form-select name="direction" label="运单配送类型">
                <option value="0">配送</option>
                <option value="1">上门换</option>
                <option value="2">上门退</option>
            </ui-form-select>
            <ui-form-select name="cooperationType" label="机构类型:">
                <option value="0">自营</option>
                <option value="1">合作站</option>
                <option value="1">合作商</option>
                <option value="1">大型合作商</option>
            </ui-form-select>
            <ui-form-select name="expressScheduleType" label="配送时效要求:">
                <option value="0">未知</option>
                <option value="1">当日达</option>
                <option value="2">次晨达</option>
                <option value="3">三日达</option>
                <option value="4">工作日</option>
                <option value="5">节假日</option>
                <option value="6">夜间配</option>
                <option value="7">上午达</option>
                <option value="8">下午达</option>
            </ui-form-select>
            <ui-form-select name="state" label="激活状态:">
                <option value="0">否</option>
                <option value="1">是</option>
            </ui-form-select>
            <ui-form-input name="firstPrice" label="首件价格:"></ui-form-input>
            <ui-form-input name="secondPrice" label="拖件价格:"></ui-form-input>
            <ui-form-input name="provinceCode" label="省直辖市编码:"></ui-form-input>
            <ui-form-input name="orgCode" label="机构编码:"></ui-form-input>
            <ui-form-date label="启用时间" name="startTime"></ui-form-date>
            <ui-form-date label="关闭时间" name="endTime"></ui-form-date>
        </ui-form>
</div>
<script>
    angular.module('myApp', ['ui.form']);
    angular.module('myApp').controller('MonthCtrl', function ($scope) {
        $scope.$on('ui.form.submit',function (event,param) {
            $.ajax({
                url:"<%=request.getContextPath()%>/monthreport/add",
                type:"post",
                data:param
            }).done(function (result) {
                if(result.code=='0000'){
                    toastr.success(result.msg);
                }else{
                    toastr.error(result.msg);
                }
            }).fail(function (err) {
                
            });
        })
    });
</script>
</body>
</html>
